package cn.luckdou.PC.Hbean;

import cn.luckdou.commons.utils.Hpage;

public class BaseBean {
    private String orderByField="id";    //排序字段
    private boolean isAsc=false;          //排序规则
    private int startIndex;        //limit 开始的索引
    private int pageNum;
    private int pageSize;           //limit size
    private Long countryId;
    private String seek;          //搜索字段

    public String getOrderByField() {
        return orderByField;
    }

    public void setOrderByField(String orderByField) {
        this.orderByField = orderByField;
    }

    public boolean isAsc() {
        return isAsc;
    }

    public void setAsc(boolean asc) {
        isAsc = asc;
    }

    public int getStartIndex() {
        return startIndex;
    }

    public void setStartIndex(int startIndex) {
        this.startIndex = startIndex;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
        this.startIndex= (pageNum-1)*pageSize;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public void setHpage(Hpage hpage ){
        this.startIndex=hpage.getStartIndex();
        this.pageSize=hpage.getPagesize();
    }

    public Long getCountryId() {
        return countryId;
    }

    public void setCountryId(Long countryId) {
        this.countryId = countryId;
    }

    public String getSeek() {
        return seek;
    }

    public void setSeek(String seek) {
        this.seek = seek;
    }
}
